<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTestingXjbFactorTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('testing_xjb_factor', function (Blueprint $table) {
            $table->increments('id');
            $table->Integer('tid')->default(0)->comment('测评tid');
            $table->Integer('qid')->default(0)->comment('题目编号');
            $table->float('result')->default(0)->comment('选项权重');
            $table->float('relativeresult')->default(0)->comment('相对选项权重');
            $table->enum('status',['1','2','3'])->default('0')->comment('因素状态，1：可改善，2：增加 3：降低');
            $table->string('tag')->nullable()->comment('因素');
            $table->text('tips')->nullable()->comment('小贴士');
            $table->string('extra')->nullable()->comment('额外因素');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('testing_xjb_factor');
    }
}
